local M = {}

M.create_autocmds = function()
	vim.api.nvim_create_autocmd({ "BufEnter", "BufAdd", "BufNew", "BufNewFile", "BufWinEnter" }, {
		group = vim.api.nvim_create_augroup("TS_FOLD_WORKAROUND", {}),
		callback = function()
			vim.opt.foldmethod = "expr"
			vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
		end,
	})
end
return M
